<template>
  <div id="app">
    <el-menu router :default-active="this.$router.path" class="el-menu-demo" mode="horizontal" style="text-align: left">
      <el-submenu index="1">
        <template slot="title">审核管理</template>
        <el-menu-item index="/admin/auditSeekerInformation">求职者审核
        </el-menu-item>
        <el-menu-item index="/admin/auditCompanyInformation">企业审核
        </el-menu-item>
      </el-submenu>
      <el-menu-item index="/admin/jobType">工作类型管理</el-menu-item>
      <el-menu-item index="/admin/userInformation">用户数据管理
      </el-menu-item>
      <el-menu-item index="4" @click="logout()" style="position: absolute;right: 10px">退出登录</el-menu-item>
    </el-menu>
  </div>
</template>

<script>


export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "adminHeader",
  data() {
    return {};
  },
  methods: {
    logout() {
      window.localStorage.removeItem('Token')
      this.$router.replace('/')
    }
  }, created() {
    if (window.localStorage.getItem('Token') == null) {
      this.$router.replace('/')
    }
  }

}
</script>
